//
//  LCYChatMainCollectionViewCell.h
//  IMByLinkUs
//
//  Created by lcy on 16/1/21.
//  Copyright © 2016年 lcy. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "LCYShapedImageView.h"
#import "LCYIMMessage.h"

@protocol LUPostingMessageCollectionViewCellDelegate <NSObject>

// 需要刷新行
- (void)needToReloadItemAtIndexPath:(NSIndexPath *)indexPath withItemHeight:(CGFloat)height;

// 播放音频
- (void)tapToPlayAudioWithFileName:(NSIndexPath *)indexPath;

// 播放视频
- (void)tapToPlayVideoWithFileURL:(NSIndexPath *)indexPath;

@end

@interface LCYChatMainCollectionViewCell : UICollectionViewCell

/**
 *  自定义聊天气泡
 */
@property (nonatomic, strong) LCYShapedImageView *bubbleView;

/**
 *  头像
 */
@property (nonatomic, strong) UIImageView        *iconView;

/**
 *  用户名
 */
@property (nonatomic, strong) UILabel            *nameLabel;

/**
 *  展示发送时间
 */
@property (nonatomic, strong) UILabel            *sendTimeLabel;

/**
 *  消息
 */
@property (nonatomic, strong) LCYIMMessage       *myMessage;

/**
 *  cell的高度
 */
@property (nonatomic, assign) CGFloat            cellHeight;

/**
 *  item所在的indexPath
 */
@property (nonatomic, strong) NSIndexPath *indexPath;

/**
 *  播放提示
 */
@property (strong, nonatomic) UILabel *playHint;

/**
 *  音频长度
 */
@property (copy, nonatomic) NSString *audioDuration;

/**
 *  cell类型
 */
@property (nonatomic, assign) LCYPostingMessageCollectionViewCellType cellType;

// 代理
@property (nonatomic, assign) id<LUPostingMessageCollectionViewCellDelegate> delegate;
//- (void)setMyMessage:(LCYIMMessage *)myMessage;

@end
